package common.config.rocketmq;

import lombok.Getter;
import org.apache.rocketmq.remoting.protocol.heartbeat.MessageModel;

/**
 * MQ任务枚举
 *
 * @author 米泽鹏
 * @since 2023-10-24 下午 1:20
 */
@Getter
public enum MqTaskEnum {

	SYSTEM_LOG("SystemLog", MessageModel.CLUSTERING, "系统日志"),

	USER_DRAW_DOWN("UserDrawDown", MessageModel.CLUSTERING, "账号删除"),

	UPDATE_USERNAME_OR_NICKNAME("UpdateUsernameOrNickname", MessageModel.CLUSTERING, "修改用户名或昵称"),

	MODIFY_EMAIL("ModifyEmail", MessageModel.CLUSTERING, "邮箱换绑");

	private final String topic;

	private final MessageModel messageModel;

	private final String description;

	private final String producerGroup;

	private final String consumerGroup;

	MqTaskEnum(String topic, MessageModel messageModel, String description) {
		this.topic = topic;
		this.messageModel = messageModel;
		this.description = description;
		this.producerGroup = RocketMqConstants.PRODUCER_GROUP_PREFIX + topic;
		this.consumerGroup = RocketMqConstants.CONSUMER_GROUP_PREFIX + topic;
	}

}
